package com.pig4cloud.pigx.strategy.config.strategy;

import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * 合约模块websocket配置
 *
 * @since 2022/8/27 14;23
 */
@Data
@Component
public class ContractWebsocketConfig {
    /**
     * 核心线程池大小
     **/
    private Integer corePoolSize = 500;

    /**
     * 最大可创建的线程数
     **/
    private Integer maxPoolSize = 1000;

    /**
     * 队列最大长度
     **/
    private Integer queueCapacity = 5000;

    /**
     * 线程池维护线程所允许的空闲时间
     **/
    private Integer keepAliveSeconds = 300;

    /**
     * 线程池线程名称前缀
     */
    private String threadNamePrefix = "thread-websocket-";

    /**
     * 合约合并ws推送线程处理数量
     */
    private Integer threadHandleSizeMergeContract = 20;
}
